﻿<Window x:Class="MVVMAppPerformanceimprovement.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:local="clr-namespace:MVVMAppPerformanceimprovement"
        Title="MVVM Survival Guide" Height="250" Width="400">
    <Window.DataContext>
        <ObjectDataProvider 
            ObjectType="{x:Type local:MainWindowViewModel}" 
            IsAsynchronous="True"  />
    </Window.DataContext>
    <Grid>
        <TextBlock  Width="300" Height="56" Foreground="White"
                    HorizontalAlignment="Center" FontSize="15"
                    VerticalAlignment="Center"  FontWeight="Bold"                   
                    TextAlignment="Center" Background="Navy" >
            <TextBlock.Text>
                <PriorityBinding FallbackValue="Loading...">
                    <Binding Path="Message1" IsAsync="True" />
                    <Binding Path="Message2" IsAsync="True" />                   
                </PriorityBinding>
            </TextBlock.Text>
        </TextBlock>
    </Grid>
</Window>